﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="OrderBasket.ascx.cs" Inherits="Gollie.Controls.OrderBasket" %>

<asp:Panel ID="pnlBasket" runat="server" CssClass="basket-panel">
    <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/shopping-basket-blue-small.png" />
    <asp:Panel ID="pnlEmptyMsg" runat="server">
        <asp:Label ID="lblEmptyMsg" runat="server" Text="Uw winkelwagen is leeg." style="font-size: 1.2em; margin-bottom: 8px;"></asp:Label><br />
    </asp:Panel>
 
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None" style="margin-top:8px; margin-bottom:8px;" ShowFooter="True" OnDataBinding="GridView1_DataBinding" OnDataBound="GridView1_DataBound" OnRowCommand="GridView1_RowCommand">
        <AlternatingRowStyle BackColor="White"  ForeColor="#284775"/>
        <Columns>
            <asp:TemplateField HeaderText="">
            <ItemTemplate>
                <asp:ImageButton ID="btnDelete" runat="server"
                    ImageUrl="~/Images/delete.png"
                    ToolTip="Verwijderen"
                    CommandName="DeleteRow" 
                    CommandArgument='<%# Eval("OfferId") %>'
                    OnClientClick="return confirm('Verwijderen uit uw winkelmandje?');"
                    />
            </ItemTemplate>
            <HeaderStyle CssClass="basket-grid-header" />
            <ItemStyle CssClass="basket-grid-cell" />

           </asp:TemplateField>
            <asp:TemplateField HeaderText="Aanbieder" FooterText="Totaal">
                <ItemTemplate>
                    <a href='<%#String.Concat("../OffersPerVendor.aspx?v=", Eval("VendorId"))%>' title='<%#String.Concat(Eval("Number"), " keer ", Gollie.ObjectFormatter.GetCurrencyString(Eval("Credit")), " voor ", Gollie.ObjectFormatter.GetCurrencyString(Eval("Price")))%>' class="common"><%#Eval("Bedrijfsnaam")%></a>
                </ItemTemplate>
                <HeaderStyle CssClass="basket-grid-header" />
                <ItemStyle CssClass="basket-grid-cell" />
            </asp:TemplateField>

            <asp:BoundField DataField="TotalCredit" DataFormatString="{0:c2}" HeaderText="Tegoed" >
             <FooterStyle Font-Bold="false"/><ItemStyle CssClass="basket-grid-cell" /><HeaderStyle CssClass="basket-grid-header" />
            </asp:BoundField>
            <asp:BoundField DataField="TotalPrice" DataFormatString="{0:c2}" HeaderText="Prijs">
                <FooterStyle Font-Size="1.4em" Font-Bold="true" CssClass="basket-grid-footer"/><ItemStyle CssClass="basket-grid-cell" /><HeaderStyle CssClass="basket-grid-header" />
            </asp:BoundField>
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle CssClass="basket-grid-footer" />
        <HeaderStyle CssClass="basket-grid-header" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle CssClass="basket-grid-row" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    <table style="width: 100%;">
        <tr>
            <td style="text-align:left;"><asp:ImageButton ID="btnTrash" runat="server" ImageUrl="~/Images/trash_can.png" CommandName="EmptyBasket" Width="11px" Height="19px" OnClientClick="return confirm('Winkelmandje leegmaken?');" OnClick="ImageButton1_Click" ToolTip="Winkelmandje leeg maken"/></td>
            <td style="text-align:right;"><asp:Button ID="btnPay" runat="server" Text="Afrekenen" CommandName="Order" PostBackUrl="~/PaymentOptionChoice.aspx"/></td>
        </tr>
    </table>

</asp:Panel>
